home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC / src / stdafx.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  5.6 KB  |  242 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. // STDAFX.H is the header that includes the standard includes that are used
  12. //  for most of the project.  These are compiled into a pre-compiled header
  13.  
  14. // turn off warnings for /W4 (just for MFC implementation)
  15. #ifndef ALL_WARNINGS
  16. #pragma warning(disable: 4073)  // disable warning about using init_seg
  17. #endif
  18.  
  19. // MFC inline constructors (including compiler generated) can get deep
  20. #pragma inline_depth(16)
  21.  
  22. #if defined(_WIN32_WCE)
  23. #if defined(_AFX_CORE_IMPL) || defined(_AFX_OLE_IMPL)
  24.     #define _AFX_DEVBUILD
  25. #endif
  26. #endif // _WIN32_WCE
  27.  
  28. #ifdef _AFX_DEVBUILD
  29.     #define AFX_IMPL_DATA AFX_DATA_EXPORT
  30. #else
  31.     #define AFX_IMPL_DATA
  32. #endif
  33.  
  34. // override default values for data import/export when building MFC DLLs
  35. #ifdef _AFX_CORE_IMPL
  36.     #define AFX_CORE_DATA   AFX_IMPL_DATA
  37.     #define AFX_CORE_DATADEF
  38. #endif
  39.  
  40. #ifdef _AFX_OLE_IMPL
  41.     #define AFX_OLE_DATA    AFX_IMPL_DATA
  42.     #define AFX_OLE_DATADEF
  43. #endif
  44.  
  45. #ifdef _AFX_DB_IMPL
  46.     #define AFX_DB_DATA     AFX_IMPL_DATA
  47.     #define AFX_DB_DATADEF
  48. #endif
  49.  
  50. #ifdef _AFX_NET_IMPL
  51.     #define AFX_NET_DATA    AFX_IMPL_DATA
  52.     #define AFX_NET_DATADEF
  53. #endif
  54.  
  55. #define _AFX_NOFORCE_LIBS
  56. #define _AFX_FULLTYPEINFO
  57. #define VC_EXTRALEAN
  58. #define NO_ANSIUNI_ONLY
  59. #define _MFC_OVERRIDES_NEW
  60.  
  61. // core headers
  62. #include "afx.h"
  63. #include "afxplex_.h"
  64. #include "afxcoll.h"
  65.  
  66. // public headers
  67. #include "afxwin.h"
  68. #include "afxdlgs.h"
  69. #include "afxext.h"
  70. #if defined(_WIN32_WCE)
  71.     #include "wcethunk.h"
  72. #endif // _WIN32_WCE
  73.  
  74. #ifndef _AFX_NO_OLEDB_SUPPORT
  75.     #include "atlbase.h"
  76. #endif
  77.  
  78. #ifndef _AFX_NO_OLE_SUPPORT
  79.     #ifndef _OLE2_H_
  80.         #include <ole2.h>
  81.     #endif
  82.  
  83. #ifndef _WINSPOOL_
  84. #include <winspool.h>
  85. #endif
  86.  
  87. // include OLE dialog/helper APIs
  88. #ifndef _OLEDLG_H_
  89.     #include <oledlg.h>
  90. #endif
  91.  
  92. #include <winreg.h>
  93.     #include "afxcom_.h"
  94. #if defined(_WIN32_WCE)
  95.     #ifdef _AFX_OLE_IMPL
  96.         #include "wceoleth.h"
  97.     #endif
  98. #endif // _WIN32_WCE
  99. #include "afxole.h"
  100. #if !defined(_WIN32_WCE_NO_OLE)
  101. #include "afxdtctl.h"
  102. #endif // _WIN32_WCE_NO_OLE
  103.  
  104. #include "afxdocob.h"
  105.  
  106. #ifndef _AFX_NO_DAO_SUPPORT
  107.     #include "afxdao.h"
  108. #endif
  109.  
  110.     #include "afxodlgs.h"
  111. #endif
  112.  
  113. #ifndef _AFX_NO_OCX_SUPPORT
  114.     #include "afxctl.h"
  115. #endif
  116. #ifndef _AFX_NO_DB_SUPPORT
  117.     #include "afxdb.h"
  118. #endif
  119. #ifndef _AFX_NO_SYNC_SUPPORT
  120.     #include "afxmt.h"
  121. #endif
  122. #ifndef _AFX_NO_INET_SUPPORT
  123.     #include "afxinet.h"
  124. #endif
  125.  
  126. // private headers as well
  127. #include "afxpriv.h"
  128. #include "afximpl.h"
  129. #include "winhand_.h"
  130. #ifndef _AFX_NO_OLE_SUPPORT
  131.     #include "oleimpl2.h"
  132. #endif
  133. #ifndef _AFX_NO_OCX_SUPPORT
  134.     #include "ctlimpl.h"
  135. #if defined(_WIN32_WCE)
  136.     #include "wcefont.h"
  137. #endif // _WIN32_WCE
  138. #endif
  139. #ifndef _AFX_NO_DB_SUPPORT
  140.     #include "dbimpl.h"
  141. #endif
  142. #if defined(_WIN32_WCE)
  143.     #include "wcedb.h"
  144. #endif // _WIN32_WCE
  145. #ifndef _AFX_NO_DAO_SUPPORT
  146.     #include "daoimpl.h"
  147. #endif
  148. #ifndef _AFX_NO_SOCKET_SUPPORT
  149.     #ifndef _WINSOCKAPI_
  150.         #include <winsock.h>
  151.     #endif
  152.     #include "sockimpl.h"
  153.     #include "afxsock.h"
  154. #endif
  155. #ifndef _AFX_NO_AFXCMN_SUPPORT
  156.     #include "afxcmn.h"
  157.     #include "afxcview.h"
  158. #endif
  159. #ifndef _AFX_NO_RICHEDIT_SUPPORT
  160.     #include "afxrich.h"
  161. #endif
  162. #ifndef _AFX_NO_DHTML_SUPPORT
  163.     #include "afxhtml.h"
  164. #endif
  165.  
  166. #include <winreg.h>
  167. #include <winnls.h>
  168. #ifndef _INC_STDDEF
  169. #include <stddef.h>
  170. #endif
  171. #ifndef _INC_LIMITS
  172. #include <limits.h>
  173. #endif
  174. #include <malloc.h>
  175. #ifndef _INC_NEW
  176. #include <new.h>
  177. #endif
  178. #ifndef _AFX_OLD_EXCEPTIONS
  179. #include <eh.h>     // for set_terminate
  180. #endif
  181.  
  182. #undef AfxWndProc
  183.  
  184. // implementation uses _AFX_PACKING as well
  185. #ifdef _AFX_PACKING
  186. #ifndef ALL_WARNINGS
  187. #pragma warning(disable: 4103)
  188. #endif
  189. #pragma pack(_AFX_PACKING)
  190. #endif
  191.  
  192. // special exception handling just for MFC library implementation
  193. #ifndef _AFX_OLD_EXCEPTIONS
  194.  
  195. // MFC does not rely on auto-delete semantics of the TRY..CATCH macros,
  196. //  therefore those macros are mapped to something closer to the native
  197. //  C++ exception handling mechanism when building MFC itself.
  198.  
  199. #undef TRY
  200. #define TRY { try {
  201.  
  202. #undef CATCH
  203. #define CATCH(class, e) } catch (class* e) \
  204.     { ASSERT(e->IsKindOf(RUNTIME_CLASS(class))); UNUSED(e);
  205.  
  206. #undef AND_CATCH
  207. #define AND_CATCH(class, e) } catch (class* e) \
  208.     { ASSERT(e->IsKindOf(RUNTIME_CLASS(class))); UNUSED(e);
  209.  
  210. #undef CATCH_ALL
  211. #define CATCH_ALL(e) } catch (CException* e) \
  212.     { { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); UNUSED(e);
  213.  
  214. #undef AND_CATCH_ALL
  215. #define AND_CATCH_ALL(e) } catch (CException* e) \
  216.     { { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); UNUSED(e);
  217.  
  218. #undef END_TRY
  219. #define END_TRY } catch (CException* e) \
  220.     { ASSERT(e->IsKindOf(RUNTIME_CLASS(CException))); e->Delete(); } }
  221.  
  222. #undef THROW_LAST
  223. #define THROW_LAST() throw
  224.  
  225. // Because of the above definitions of TRY...CATCH it is necessary to
  226. //  explicitly delete exception objects at the catch site.
  227.  
  228. #define DELETE_EXCEPTION(e) do { e->Delete(); } while (0)
  229. #define NO_CPP_EXCEPTION(expr)
  230.  
  231. #else   //!_AFX_OLD_EXCEPTIONS
  232.  
  233. // In this case, the TRY..CATCH macros provide auto-delete semantics, so
  234. //  it is not necessary to explicitly delete exception objects at the catch site.
  235.  
  236. #define DELETE_EXCEPTION(e)
  237. #define NO_CPP_EXCEPTION(expr) expr
  238.  
  239. #endif  //_AFX_OLD_EXCEPTIONS
  240.  
  241. /////////////////////////////////////////////////////////////////////////////
  242.